import { ref } from "vue";
import { defineStore } from "pinia";

export const Authorization = defineStore(
  "authorization",
  () => {
    // let permissions: FunctionalModele[] = [];
    // let permissions = ref<IFunctionalModele[]>();
    // let token:string = "";
    let token = ref<string>();
    // let ss = ref<string[]>();
    function SetToken(value: string) {
      token.value = value;
    }

    function GetToken(): string {
      return token.value ?? "";
    }

    function ResetToken() {
      token.value = "";
    }
    return { SetToken, ResetToken, GetToken, token };
  }
);

